package nuonuo.com.mytest;

import android.content.Context;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

    private Button btnSeekbar,btnImageScale;
    private Context mContext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mContext = this;
        initViews();
        setListener();
    }

    private void setListener() {
        btnSeekbar.setOnClickListener(this);
    }

    private void initViews() {
        btnSeekbar = (Button) findViewById(R.id.btn_seekbar);
        btnImageScale = (Button) findViewById(R.id.btn_image_scale);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_seekbar:
                Intent intent = new Intent(mContext,SeekBarActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_image_scale:
                break;
        }
    }
}
